3.8 \(\int \frac{1}{(4+2 x+x^2) \sqrt{5+2 x+x^2}} \, dx\)

Optimal. Leaf size=28 \[ \frac{\tan ^{-1}\left (\frac{x+1}{\sqrt{3} \sqrt{x^2+2 x+5}}\right )}{\sqrt{3}} \]

[Out]

ArcTan[(1 + x)/(Sqrt[3]*Sqrt[5 + 2*x + x^2])]/Sqrt[3]

________________________________________________________________________________________

Rubi [A]  time = 0.0172824, antiderivative size = 28, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.087, Rules used = {982, 204} \[ \frac{\tan ^{-1}\left (\frac{x+1}{\sqrt{3} \sqrt{x^2+2 x+5}}\right )}{\sqrt{3}} \]

Antiderivative was successfully verified.

[In]

Int[1/((4 + 2*x + x^2)*Sqrt[5 + 2*x + x^2]),x]

[Out]

ArcTan[(1 + x)/(Sqrt[3]*Sqrt[5 + 2*x + x^2])]/Sqrt[3]

Rule 982

Int[1/(((a_) + (b_.)*(x_) + (c_.)*(x_)^2)*Sqrt[(d_.) + (e_.)*(x_) + (f_.)*(x_)^2]), x_Symbol] :> Dist[-2*e, Su
bst[Int[1/(e*(b*e - 4*a*f) - (b*d - a*e)*x^2), x], x, (e + 2*f*x)/Sqrt[d + e*x + f*x^2]], x] /; FreeQ[{a, b, c
, d, e, f}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[e^2 - 4*d*f, 0] && EqQ[c*e - b*f, 0]

Rule 204

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTan[(Rt[-b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[-b, 2]), x] /
; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rubi steps

\begin{align*} \int \frac{1}{\left (4+2 x+x^2\right ) \sqrt{5+2 x+x^2}} \, dx &=-\left (4 \operatorname{Subst}\left (\int \frac{1}{-24-2 x^2} \, dx,x,\frac{2+2 x}{\sqrt{5+2 x+x^2}}\right )\right )\\ &=\frac{\tan ^{-1}\left (\frac{1+x}{\sqrt{3} \sqrt{5+2 x+x^2}}\right )}{\sqrt{3}}\\ \end{align*}

Mathematica [C]  time = 0.0677789, size = 84, normalized size = 3. \[ -\frac{i \left (\tanh ^{-1}\left (\frac{-i \sqrt{3} x-i \sqrt{3}+4}{\sqrt{x^2+2 x+5}}\right )-\tanh ^{-1}\left (\frac{i \sqrt{3} x+i \sqrt{3}+4}{\sqrt{x^2+2 x+5}}\right )\right )}{2 \sqrt{3}} \]

Antiderivative was successfully verified.

[In]

Integrate[1/((4 + 2*x + x^2)*Sqrt[5 + 2*x + x^2]),x]

[Out]

((-I/2)*(ArcTanh[(4 - I*Sqrt[3] - I*Sqrt[3]*x)/Sqrt[5 + 2*x + x^2]] - ArcTanh[(4 + I*Sqrt[3] + I*Sqrt[3]*x)/Sq
rt[5 + 2*x + x^2]]))/Sqrt[3]

________________________________________________________________________________________

Maple [A]  time = 0.048, size = 27, normalized size = 1. \begin{align*}{\frac{\sqrt{3}}{3}\arctan \left ({\frac{\sqrt{3} \left ( 2\,x+2 \right ) }{6}{\frac{1}{\sqrt{{x}^{2}+2\,x+5}}}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(x^2+2*x+4)/(x^2+2*x+5)^(1/2),x)

[Out]

1/3*3^(1/2)*arctan(1/6*3^(1/2)/(x^2+2*x+5)^(1/2)*(2*x+2))

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{1}{\sqrt{x^{2} + 2 \, x + 5}{\left (x^{2} + 2 \, x + 4\right )}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(x^2+2*x+4)/(x^2+2*x+5)^(1/2),x, algorithm="maxima")

[Out]

integrate(1/(sqrt(x^2 + 2*x + 5)*(x^2 + 2*x + 4)), x)

________________________________________________________________________________________

Fricas [A]  time = 1.03401, size = 123, normalized size = 4.39 \begin{align*} \frac{1}{3} \, \sqrt{3} \arctan \left (\frac{1}{3} \, \sqrt{3} \sqrt{x^{2} + 2 \, x + 5}{\left (x + 1\right )} - \frac{1}{3} \, \sqrt{3}{\left (x^{2} + 2 \, x + 4\right )}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(x^2+2*x+4)/(x^2+2*x+5)^(1/2),x, algorithm="fricas")

[Out]

1/3*sqrt(3)*arctan(1/3*sqrt(3)*sqrt(x^2 + 2*x + 5)*(x + 1) - 1/3*sqrt(3)*(x^2 + 2*x + 4))

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{1}{\left (x^{2} + 2 x + 4\right ) \sqrt{x^{2} + 2 x + 5}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(x**2+2*x+4)/(x**2+2*x+5)**(1/2),x)

[Out]

Integral(1/((x**2 + 2*x + 4)*sqrt(x**2 + 2*x + 5)), x)

________________________________________________________________________________________

Giac [B]  time = 1.14215, size = 70, normalized size = 2.5 \begin{align*} -\frac{1}{3} \, \sqrt{3} \arctan \left (-\frac{1}{3} \, \sqrt{3}{\left (x - \sqrt{x^{2} + 2 \, x + 5} + 2\right )}\right ) + \frac{1}{3} \, \sqrt{3} \arctan \left (-\frac{1}{3} \, \sqrt{3}{\left (x - \sqrt{x^{2} + 2 \, x + 5}\right )}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(x^2+2*x+4)/(x^2+2*x+5)^(1/2),x, algorithm="giac")

[Out]

-1/3*sqrt(3)*arctan(-1/3*sqrt(3)*(x - sqrt(x^2 + 2*x + 5) + 2)) + 1/3*sqrt(3)*arctan(-1/3*sqrt(3)*(x - sqrt(x^
2 + 2*x + 5)))